package com.jxb.myshop.services.impl;

import com.jxb.myshop.common.ResponseResult;
import com.jxb.myshop.dao.GoodsTypeDao;
import com.jxb.myshop.dao.impl.GoodsTypeDaoImpl;
import com.jxb.myshop.entity.Type;
import com.jxb.myshop.services.GoodsTypeServices;

import java.util.List;

public class GoodsTypeServicesImpl implements GoodsTypeServices {
    private GoodsTypeDao gd = new GoodsTypeDaoImpl();
    @Override
    public ResponseResult getAll() {
        try {
            List<Type> list = gd.getAll();
            return ResponseResult.createSuccess(list);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  ResponseResult.createFail("未找到数据");
    }
}
